fix(nooa-bench): always persist traces and dump a local trajectory - #69
Merged
Conversation
Two independent gaps meant a Harbor run could finish with no trajectory stored anywhere on disk, which blocked post-hoc failure analysis. 1. The exporter choice was mutually exclusive: when OTLP_ENDPOINT was reachable the runner installed only the streaming journal exporter, and the JSONL file exporter lived in the else branch. Benchmark configs set OTLP_ENDPOINT, so those runs streamed spans to the viewer and wrote nothing locally. The file exporter is now unconditional and the journal exporter is added alongside it. 2. Nothing wrote per-turn history into the per-task agent/ directory -- it held only nooa_bench.log and a result.json carrying just the final response. Add _write_trajectory(), dumping the agent's full event history to agent/trajectory.json where failure analysis actually looks. extra_resource_attrs (eval.model, eval.agent_type) are now applied in both branches rather than only the streaming one, so file-only runs stay attributable to their model and agent type. Trajectory serialisation failures are logged and swallowed -- a debug artifact must never fail the task. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
A Harbor run could finish with no trajectory stored anywhere on disk, which blocks post-hoc failure analysis. This was hit in practice — reported as:
Two independent causes.
1. The exporter choice was mutually exclusive
_setup_tracing()installed either the streaming journal exporter or the JSONL file exporter:Benchmark configs set
OTLP_ENDPOINT, so those runs streamed spans to the viewer and wrote nothing locally. If the viewer was down, restarted, or the network blipped, the trajectory was simply gone.2. Nothing wrote per-turn history where anyone looks for it
The per-task
agent/directory held onlynooa_bench.logandresult.json— andresult.jsoncarries just the final response. So the directory named in the report above was genuinely empty of trajectory data under either branch, since JSONL goes to/logs/artifacts/traces/.Changes
OTLP_ENDPOINTis reachable. Live viewing no longer costs the durable copy._write_trajectory(), dumping the agent's full event history toagent/trajectory.json.extra_resource_attrs(eval.model,eval.agent_type) now apply in both cases, not just the streaming one, so file-only runs stay attributable.Notes
Trajectory serialisation failures are logged and swallowed — a debug artifact must never fail a task. The OTLP spans under
/logs/artifacts/traces/remain the canonical record;trajectory.jsonis the greppable companion.🤖 Generated with Claude Code